var  http=require('http');
var fs = require('fs');
var server = http.createServer();
var urls=res.url;

// console.log(urls);


server.on('request',function(res,rso){

if(urls=='/'){
    rso.setHeader('Content-type','text/html;charset=utf-8');

fs.readFile('./jiuyoutitle.html','utf8',function(err,data){  
    rso.end(data);
    })
}else{

    fs.readFile('.'+urls,function(err,data){
rso.end(data );
    
})
}
})
server.listen(8000,function(){
    console.log('请打开浏览器')
})